﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RPCServer.Core
{
    class GlobalMBufferManager : Singleton<GlobalMBufferManager>
    {
        Dictionary<int, MBufferManager> _buffers;
        public MBuffer GetBuffer(int bufferSize)
        {
            if(_buffers.ContainsKey(bufferSize))
            {
                return _buffers[bufferSize].ApplyBuffer();
            }
            return MBuffer.EmptyBuffer;
        }
    }
}
